// --------------------------------------------------------------------------------------------------------------------
// <copyright file="SortDialogFactory.cs" company="GT">
//   Gunther Taborga
// </copyright>
// <summary>
//   Defines the SortDialogFactory type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace BatchID3.Editor.Dialogs
{
    using System.Collections.Generic;

    using BatchID3.Enumerations;
    using BatchID3.Mp3;

    public class SortDialogFactory : ISortDialogFactory
    {
        private readonly IMp3FileSystemManager mp3FileSystemManager;

        private readonly IFolderBrowserDialogFactory folderBrowserDialogFactory;

        private readonly IMp3PreviewFactory mp3PreviewFactory;

        public SortDialogFactory(
            IMp3FileSystemManager mp3FileSystemManager,
            IFolderBrowserDialogFactory folderBrowserDialogFactory,
            IMp3PreviewFactory mp3PreviewFactory)
        {
            this.mp3FileSystemManager = mp3FileSystemManager;
            this.folderBrowserDialogFactory = folderBrowserDialogFactory;
            this.mp3PreviewFactory = mp3PreviewFactory;
        }

        public ISortDialog GetSortDialog(
            IEnumerable<IMp3Entity> mp3Entities, 
            IEnumerable<TagToken> tagTokens, 
            IEnumerable<TagToken> preSelectedTagTokens, 
            string loadedDirectory, 
            string previousDestinationDirectory)
        {
            return new SortDialog(
                this.mp3FileSystemManager,
                this.folderBrowserDialogFactory,
                this.mp3PreviewFactory,
                mp3Entities,
                tagTokens,
                preSelectedTagTokens,
                loadedDirectory,
                previousDestinationDirectory);
        }
    }
}